package com.dcw.lixb.designmode.singleinstance;

/**
 * @author lixiaobin
 * @date 2020-07-16 17:19:12
 * @desc 饱汉式
 * 是否 Lazy 初始化：否
 *
 * 是否多线程安全：是
 *
 * 实现难度：易
 */
public class SingleA {
    private static SingleA sSingleA = new SingleA();

    private SingleA() {
        try {
            Thread.sleep(200L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static SingleA getSingleA() {
        return sSingleA;
    }
}
